package com.health.life;


import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import com.health.life.utils.DBUtil;


/**
 * 欢迎页面
 * 
 * @author Ken Li
 * 
 */
public class WelcomeActivity extends MyBaseActivity {

	private Context context = WelcomeActivity.this;
	private int intentType=0;


	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.welcome);
		isFirst=isFirst();
		initView();
	}



	/***
	 * 初始化一些系统参数
	 */
	public void initView() {
		if (!isNetMsg())
		{
			return;
		}
		if (isFirst)
		{
			DBUtil dbUtil=new DBUtil(this);
			dbUtil.copyDB();
			setIsFirst(false);
		}

//		intentType=2;

		startMain();
	}





	public void startMain() {
		switch (intentType)
		{
			case 0:
				startActivity(new Intent(this,MainActivity.class));
				break;
			case 1:
				startActivity(new Intent(this,HomeActivity.class));
				break;
			case 2:
				startActivity(new Intent(this,ShareActivity.class));
				break;
			default:

		}
		finish();
	}



}
